package cn.sunxyz.idea.sample;

/**
 * Created by yangrd on 2017/5/24.
 */
public interface ProxyMethod {

    void intercept(Invocation invocation);

    default Object doProxy(Invocation invocation) {
        while (invocation.invocationMethod.hasNext()) {
            invocation.invocationMethod.next().intercept(invocation);
        }
        return null;
    }
}
